<script>
$(document).ready(function(){
    $("#only_semester").click(function(){
        $("#select-subject").trigger('change');
      });
    $("input[type=radio]").click(function(){
        $("#saveBtn").attr('disabled','');
      });
});
</script>
<div class="ui-widget ui-widget-content" style="margin:5px;padding:5px">
<span><?php echo $this->translate('Please select the class you want to copy the source of')?></span>
<input id="only_semester" type="checkbox"  name="only_semester" value="1"
 <?php if ($this->only_semester !==0):?>checked="checked" <?php endif?>/>
<label for="only_semester"><?php echo $this->translate('Only shows data when the semester')?></label>

<?php if ($this->data):?>
<table class="hor-minimalist-b" style="margin:5px">
<thead>
<tr>
<th></th>
<th><?php echo $this->translate('year')?></th>
<th><?php echo $this->translate('semester')?></th>
<th><?php echo $this->translate('group name')?></th>
<th><?php echo $this->translate('teacher')?></th>
<th><?php echo $this->translate('current number')?> / <?php echo $this->translate('member')?></th>
</tr>
</thead>
<tbody>
<?php foreach ($this->data as $row):?>
<?php if ($row['cc'] > 0):?>
<tr>
<td><input type="radio"   name="sel-sn"  id="sel-<?php echo $row['sn']?>"  value="<?php echo $row['sn']?>"/></td>
<td><?php echo $row['year']?></td>
<td><?php echo $row['semester']?></td>
<td><?php echo $row['group_name']?></td>
<td><?php echo $row['teacher_name']?></td>
<td><?php echo $row['cc']?> / <?php echo $row['member']?></td>
</tr>
<?php endif?>
<?php endforeach?>
</tbody>

</table>
<?php endif?>
</div>
